LearningStoreHelper.Cast<T> Method (object, out T)

Converts a value returned from a LearningStore query to a given type, or null if the value is DBNull.

Parent Type: LearningStoreHelper

Namespace: Microsoft.SharePointLearningKit

Assembly: Microsoft.SharePointLearningKit.dll

Syntax
C#

public static void Cast<T> (
object value,
out T result

)

where T : class

Type Parameters

T

The type to convert to.

Parameters

value

A value from a DataRow within a DataTable returned from a LearningStore query.

result

Where to store the result. value is cast to the type of result, or is set to null if value is DBNull.

Remarks

This version of Cast is used to retrieve a reference type from LearningStore, i.e. string, LearningStoreXml, IStreamable, or LearningStoreItemIdentifier. If the input value is the database "NULL" value, then null is stored in the output parameter.